 {% if posts.has_previous %}
    <a href="/index1.html?p={{ posts.previous_page_number }}">上一页</a>
    {% else %}
    <a href="#">上一页</a>
{% endif %}
{% for i in posts.paginator.pager_num_range %}
    {% if i == posts.number  %}
        <a style="font-size: 30px;" href="/index1.html?p={{ i }}">{{ i }}</a>
    {% else %}
        <a href="/index1.html?p={{ i }}">{{ i }}</a>
    {% endif %}
{% endfor %}

{% if posts.has_next %}
    <a href="/index1.html?p={{ posts.next_page_number }}">下一页</a>
{% endif %}
<span>
    {{ posts.number }}/{{ posts.paginator.num_pages }}
</span>